﻿using FwProject.Distribution.Dto.Statistics;
using System;
using System.Collections.Generic;
using System.Text;

namespace FwProject.PrePaymentInfo.Dto
{
    public class FinanceSummaryOutputDto
    {
        /// <summary>
        /// 配送统计
        /// </summary>
        public List<DistributionProductStatisticsDto> DistributionProductStatistics { get; set; }

        /// <summary>
        /// 应收统计
        /// </summary>
        public ReceivableStatisticsDto ReceivableStatistics { get; set; }

        /// <summary>
        /// 押金统计
        /// </summary>
        public DepositStatisticsDto DepositStatistics { get; set; }
    }

    /// <summary>
    /// 应收统计
    /// </summary>
    public class ReceivableStatisticsDto
    {
        /// <summary>
        /// 期初应收金额
        /// </summary>
        public decimal InitialReceivableMoney { get; set; }

        /// <summary>
        /// 本期增加应收金额
        /// </summary>
        public decimal PeriodIncreasedReceivableMoney { get; set; }

        /// <summary>
        /// 本期优惠金额
        /// </summary>
        public decimal PeriodPreferentialMoney { get; set; }

        /// <summary>
        /// 本期收款金额
        /// </summary>
        public decimal PeriodReceiptMoney { get; set; }

        /// <summary>
        /// 期末应收金额
        /// </summary>
        public decimal FinalReceivableMoney { get; set; }

        /// <summary>
        /// 期初预收款金额
        /// </summary>
        public decimal InitialPrepaymentsMoney { get; set; }

        /// <summary>
        /// 本期回收预收款金额
        /// </summary>
        public decimal PeriodRecyclingPrepaymentsMoney { get; set; }

        /// <summary>
        /// 本期使用预收款
        /// </summary>
        public decimal PeriodUsePrepaymentsMoney { get; set; }

        /// <summary>
        /// 本期核销预收款
        /// </summary>
        public decimal PeriodWriteOffPrepaymentsMoney { get; set; }

        /// <summary>
        /// 期末预收款余额
        /// </summary>
        public decimal FinalPrepaymentsMoney { get { return InitialPrepaymentsMoney + PeriodRecyclingPrepaymentsMoney - PeriodWriteOffPrepaymentsMoney; } }
    }

    /// <summary>
    /// 押金统计
    /// </summary>
    public class DepositStatisticsDto
    {
        /// <summary>
        /// 期初押金余额
        /// </summary>
        public decimal InitialDepositMoney { get; set; }

        /// <summary>
        /// 本期收回押金
        /// </summary>
        public decimal PeriodRecyclingDepositMoney { get; set; }

        /// <summary>
        /// 本期退还押金
        /// </summary>
        public decimal PeriodReturnDepositMoney { get; set; }

        /// <summary>
        /// 期末押金余额
        /// </summary>
        public decimal FinalDepositMoney { get { return InitialDepositMoney + PeriodRecyclingDepositMoney - PeriodReturnDepositMoney; } }
    }
}
